function submitCaseForm() {
	var form = $("#submitCaseForm");
	form.find(".easyui-validatebox").validatebox({
		required : true
	});

	if ($("#submitCaseForm").form("validate")) {
		if(valid()){
			var caseName = $("#caseName").val();
			var content = $("#content").val();
			
			$.post("SubmitCase", {caseName : caseName, content : content}, function(text) {
				var data = (new Function("return "+text))();
				alert(data.status);
				if(data.status.indexOf('成功'))
					$("#submitCaseWindow").window("close"); 
			});
		}
	}
}

//验证信息
function valid() {	
	var caseName = $('#caseName').val();
	caseName = $.trim(caseName);

	if (caseName==null || caseName.length==0){
		alert("请输入案例名称！");
		return false;
	}
	
	var caseContent = $('#content').val();
	caseContent = $.trim(caseContent);
	if (caseContent==null || caseContent.length==0){
		alert("请输入案例内容！");
		return false;
	}

	return true;
}